第12步:现在让我们构建一个函数,告诉我们角色在木星上的重量!

  • 点击 ,将 Define Function with Parameters 拖动到程序底部。
  • 将函数名称更改为 get_jupiter_weight
  • 将函数中的第一个参数更改为 earth_weight。删除函数中的第二个参数。
  • 点击 ,将 Float Variable 拖动到函数内部。它的前面应当有一个 ····

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)